Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: additional api endpoint (jupiterapi.com) #14

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

zer0cache
Copy link
Contributor

@zer0cache zer0cache commented May 30, 2024

This PR adjusts the API constants provided for the jupiter package. The default API was updated for swap/quote to leverage jupiterapi.com. The API offers higher rate limits along with a faster updated market cache. The jupiterapi.com market cache surfaces newly launched tokens faster since it doesn't require a certain volume/liquidity threshold to be met, along with an improved cadence of it being updated. With that said, the API does take a small platform fee (0.2%) on swaps given the stability/rate limits/new markets it provides. More details can be found on their site.

I also updated the README.md to provide options to other endpoints in case higher rate limits are needed.

@ilkamo
Copy link
Owner

ilkamo commented Jun 1, 2024

Hi @zer0cache, thanks for the contribution.

I have concerns about changing the DefaultAPIURL to one that includes a platform fee. While the fee is small, it's crucial that developers are fully aware of this change and make the decision to use the new API endpoint consciously. If we were to change the DefaultAPIURL, there's a risk that developers might inadvertently update the library and start using the new API, thereby incurring fees unknowingly. I want to ensure that we avoid this scenario.

Therefore, I propose that we keep the current DefaultAPIURL as is. We can include the new API endpoint as a second option and clearly document its benefits and the associated platform fee in the README.md. This way, developers can make a conscious decision based on their specific needs.

I'm open to merging this PR with the above modification. Looking forward to your thoughts on this.

@zer0cache
Copy link
Contributor Author

Hi @ilkamo!

This is great feedback and thank you for taking the time out to review. Those are valid points and I forgot to consider about the inadvertently updating the library and the URL changing on folks. I'll make the proposed update of keeping DefaultAPIURL the same along with the second option with the associated information on the README.md.

Thank you for the feedback and love the library!

@ilkamo ilkamo changed the title Update api.go and README.md feat: additional api endpoint (jupiterapi.com) Jun 4, 2024
@ilkamo ilkamo merged commit f3630e3 into ilkamo:main Jun 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants